Skip to content

Add tests for update stream throttling #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Feb 5, 2025

I stumbled across this while debugging test timeouts in the PowerSync package, which I assumed where caused by throttled streams not forwarding done / cancellation events properly. That didn't turn out to be the cause, but at least we have tests for the throttling behavior now.

Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there are still a couple of updates to the implementation - did that change anything significant?

@simolus3
Copy link
Contributor Author

simolus3 commented Feb 5, 2025

Adding the bound on T is not really a change because we're only using it for non-nullable UpdateNotifications either way. The only change in behavior is that when the source stream emits a done event, we're now forwarding that to the client instead of going idle forever without ever emitting anything again. That's not a significant change either though (the source update stream will only close as the database is closed).

@simolus3 simolus3 merged commit 016e341 into main Feb 5, 2025
7 checks passed
@simolus3 simolus3 deleted the fix/throttle-improvements branch February 5, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants